<%@page language="java" import="java.util.*,java.sql.*" contentType="text/html; charset=utf-8"%>
<%@page import="java.io.*,java.util.*,java.sql.*, com.animal.dao.*" %>

<% request.setCharacterEncoding("utf-8");
	
	String id = String.valueOf(request.getParameter("I"));
	String name = String.valueOf(request.getParameter("N"));
	String sex = String.valueOf(request.getParameter("S"));
	String phone = String.valueOf(request.getParameter("P"));
	String email = String.valueOf(request.getParameter("E"));
	
	String queryStr = "update animalfile09_archvist set Name=?,Gender=?,PhoneNumber=?,Email=? where ID=?";
	Connection conn = Connect.getCon();
	PreparedStatement pstmt = conn.prepareStatement(queryStr);
	pstmt.setString(1,name);
	pstmt.setString(2,sex);
	pstmt.setString(3,phone);
	pstmt.setString(4,email);
	pstmt.setString(5,id);
	pstmt.executeUpdate();
	pstmt.close();
	conn.close(); 
%>
